<template>
	<view class="box">
		<view class="balance_item">
			<view>
				<span>返利支付</span>
				<span>{{ tableDates.flzfMoney }}</span>
			</view>
			<span>已使用：</span>
		</view>
		<view class="balance_item">
			<view>
				<span>预支付</span>
				<span>{{ tableDates.yzkMoney }}</span>
			</view>
			<span>已使用：</span>
			<!-- <span>已使用：{{ item.moneyed }}</span> -->
		</view>
		<view class="balance_item" v-for="(item,index) in tableDate" :key="index">
			<view>
				<span>{{ item.creditName }}</span>
				<span>{{ item.quotaed }}</span>
			</view>
			<span>已使用：{{ item.moneyed }}</span>
		</view>
	</view>
</template>

<script>
	import { frontMyAccount, frontMyUser } from '@/api/order.js'
export default {
	components: {},
	data() {
		return {
			tableDate: [],
			tableDates: []
		};
	},
	onLoad() {
		this.frontMyAccount()
		this.frontMyUser()
	},
	methods: {
		async frontMyAccount() {
			const res = await frontMyAccount()
			this.tableDate = res.data
		},
		async frontMyUser() {
			const res = await frontMyUser()
			console.log(res)
			this.tableDates = res.data
			console.log(this.tableDates)
		}
	}
};
</script>

<style scoped lang="scss">
.box {
	margin: 20rpx;
	background-color: #fff;

	.balance_item {
		display: flex;
		justify-content: space-between;
		padding: 20rpx;
		border-bottom: 1px solid #f1f1f1;

		view {
			span {
				display: inline-block;
				width: 200rpx;
			}
		}
	}
}
</style>
